//
//  AboutOursViewController.m
//  OneDay
//
//  Created by lanou3g on 15/11/4.
//  Copyright © 2015年 oneDay. All rights reserved.
//

#import "AboutOursViewController.h"

@interface AboutOursViewController ()

@end

@implementation AboutOursViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.translucent = NO;
    
    self.view.backgroundColor = [UIColor colorWithRed:205.91 / 255.0 green:239.77 / 255.0 blue:214.26 / 255.0 alpha:1];
    // Do any additional setup after loading the view.
    [self layoutLayer];
}

- (void)layoutLayer
{
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kWidth, 50)];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.font = [UIFont systemFontOfSize:25];
    [self.view addSubview:titleLabel];
    
    NSString *text = @"    在使用OneDay之前，请您务必仔细阅读并透彻理解本声明。您可以选择不使用OneDay，但如果您使用OneDay，您的使用行为将被视为对本声明内容的认可。\n    OneDay是一款提供各种活动，聚会，短视频，每日十篇美文的软件。OneDay致力于最大程度的满足使用者在闲暇时候无聊时光的丰富感，通过自行查看我们所展示的内容，来合理安排自己的闲暇时光，让您的生活更加丰富愉快\n    本应用所有内容收集整理均来自第三方软件懒人周末和开眼,访问者可将本软件内容用于娱乐欣赏,以及其他非商业用途,并同时遵循本软件合法权利。详情请下载懒人周末和开眼官方软件。\n    OneDay所有开发人员祝您生活愉快，天天开心😋";
    OneDayObject *oneDayObject = [[OneDayObject alloc] init];
    CGSize newSize = [oneDayObject sizeWithText:text font:20 width:kWidth - 40 height:10000];
    
    NSString *ourText = @"   OneDay是一款介绍和展示的APP,我们致力于最大程度的满足您在闲暇时候无聊时光的丰富感，通过自行查看我们所展示的内容，来合理安排自己的闲暇时光，让您的生活更加丰富愉快,我们收录了在您附近的各种活动,包含了聚会.绘画.讲座和旅游, 您能够方便的挑到适合您的外出活动,如果您想呆在家里打发时间,我们还为您带来了经典的文章和当下各种新颖的视频,有运动.旅行.电影.动画.时尚等一系列国内外的短片视频,能够丰富您的生活.\n     希望我们能为您的生活带来开心和愉快,感谢您的使用,OneDay所有开发人员祝您生活愉快，天天开心😋";
    CGSize ourSize = [oneDayObject sizeWithText:ourText font:20 width:kWidth - 40 height:10000];
    UILabel *ourLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, titleLabel.bottom, kWidth, ourSize.height)];
    ourLabel.font = [UIFont systemFontOfSize:20];
    ourLabel.numberOfLines = 0;
    
    UILabel *bgLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, titleLabel.bottom, kWidth - 40, newSize.height)];
    bgLabel.font = [UIFont systemFontOfSize:20];
    bgLabel.numberOfLines = 0;
    if (self.num == 1) {
        titleLabel.text = @"关于我们";
        ourLabel.text = ourText;
    }else{
        titleLabel.text = @"免责声明";
        bgLabel.text = text;
    }
    [self.view addSubview:bgLabel];
    [self.view addSubview:ourLabel];
}

- (void)viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = NO;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
